<nav class="navbar navbar-inverse navbar-fixed-top">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
              data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/">景点城市天气推荐系统</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li {% if recommend %}class="active"{% endif %}>
          <a href="/">景点推荐</a>
        </li>
        <li {% if region_weather %}class="active"{% endif %}>
          <a href="/region/110000">全国天气查询</a>
        </li>
        <li {% if max_degree or min_degree or wind_power %}class="dropdown active"{% else %}class="dropdown"{% endif %}>
          <a class="dropdown-toggle"
             data-toggle="dropdown"
             role="button" aria-haspopup="true"
             aria-expanded="false">天气分析 <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li {% if max_degree %}class="active"{% endif %}>
              <a href="/max_degree/">最高温</a>
            </li>
            <li {% if min_degree %}class="active"{% endif %}>
              <a href="/min_degree/">最低温</a>
            </li>
            <li {% if wind_power %}class="active"{% endif %}>
              <a href="/wind_power/">风力级数</a>
            </li>
          </ul>
        </li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>